package de.msiggi.Sportsdata.Testfiles;

import java.util.Calendar;
import java.util.Comparator;

import de.msiggi.Sportsdata.Webservices.Matchdata;

public class MatchDateComparator implements Comparator<Matchdata> {

	@Override
	public int compare(Matchdata x, Matchdata y) {
		Calendar xCal = x.getMatchDateTime();
		Calendar yCal = y.getMatchDateTime();
		if ( xCal.before(yCal) ) return -1;
	    if ( xCal.after(yCal) ) return 1;
	    return 0;
	}

}
